(function () {
    srcData = {
        "surveyId": 161376,
        "surveyName": "t004_对标wenjuanxing",
        "surveyType": 1,
        "subType": 0,
        "surveyStatus": 1,
        "surveyDescription": "欢迎您作答本问卷。",
        "surveyCover": "",
        "surveyIntroduction": "",
        "surveyDetailedInfo": "",
        "createTime": "2022-10-24 14:53:19",
        "createUserId": 1744335,
        "lastUpdateTime": "2023-11-20 12:25:25",
        "lastUpdateUserId": 1744335,
        "lastActivatedTime": "2023-11-20 12:25:25",
        "surveyOption": {
            "backButton": false,
            "saveAndContinue": false,
            "language": "zh_CN",
            "customFooter": "<p style=\"text-align: center;\"><span style=\"color: #707070;\">Powered by Credamo见数</span></p >",
            "pcBgImg": "",
            "mobBgImg": "",
            "styleSetting": {
                "buttonSetting": {
                    "bgColor": "#3F85FA",
                    "textColor": "#FFFFFF",
                    "submitText": "提交",
                    "lastPageText": "上一页",
                    "nextPageText": "下一页"
                },
                "pcFontSetting": {
                    "qstTextSize": "16px",
                    "qstTextColor": "#222222",
                    "surveyTitleSize": "24px",
                    "surveyTitleColor": "#000000",
                    "qstContentTextSize": "14px",
                    "qstContentTextColor": "#707070"
                },
                "mobFontSetting": {
                    "qstTextSize": "16px",
                    "qstTextColor": "#222222",
                    "surveyTitleSize": "20px",
                    "surveyTitleColor": "#222222",
                    "qstContentTextSize": "14px",
                    "qstContentTextColor": "#707070"
                },
                "watermarkSetting": {
                    "isOpen": false,
                    "watermarkText": "Credamo见数"
                },
                "pcAnswerCoverSetting": {
                    "coverUrl": "",
                    "buttonText": "立即作答",
                    "buttonBgColor": "#3F85FA",
                    "isSurveyTitle": true,
                    "buttonTextColor": "#FFFFFF",
                    "surveyTitleSize": "24px",
                    "surveyTitleColor": "#000000",
                    "isSurveyDescription": true,
                    "surveyDescriptionSize": "20px",
                    "surveyDescriptionColor": "#222222"
                },
                "mobAnswerCoverSetting": {
                    "coverUrl": "",
                    "buttonText": "立即作答",
                    "buttonBgColor": "#3F85FA",
                    "buttonTextColor": "#FFFFFF",
                    "isSurveyDescription": true,
                    "surveyDescriptionSize": "16px",
                    "surveyDescriptionColor": "#222222"
                }
            },
            "isShowTotalScore": false,
            "isAnswerTimeLimit": false,
            "answerTimeLimit": 0,
            "customVarList": [],
            "isViewAnswerDetail": false
        },
        "blocks": [
            {
                "blockId": 1197124,
                "type": 2,
                "subType": 0,
                "description": "块 2",
                "sortNo": 1,
                "blockElements": [
                    {
                        "qstId": 6433150487472128,
                        "qstUuid": "ebfaee5d-21f2-43ef-87e9-a50b53a4593f",
                        "type": 1,
                        "qstNo": "Q1",
                        "questionId": "ebfaee5d",
                        "questionText": "单选题",
                        "questionType": 2,
                        "qstTip": "",
                        "selector": 1,
                        "subSelector": 0,
                        "appType": 0,
                        "status": 1,
                        "sortNo": 1,
                        "choices": [
                            {
                                "choiceId": 6433150487472129,
                                "choiceUuid": "9356523b-ce0a-4232-965c-2bd897b3333f",
                                "choiceNo": 1,
                                "display": "<p>单选项1</p>",
                                "sortNo": 1
                            },
                            {
                                "choiceId": 6433150487472130,
                                "choiceUuid": "1c9ad97a-742f-4824-a941-3ee621c37e0d",
                                "choiceNo": 2,
                                "display": "<p>单选项2</p>",
                                "sortNo": 2
                            },
                            {
                                "choiceId": 6433150487472131,
                                "choiceUuid": "274aa78b-3af2-4788-bb35-9d6adf081550",
                                "choiceNo": 3,
                                "display": "<p>单选项3</p>",
                                "sortNo": 3
                            }
                        ],
                        "validation": {
                            "type": 0,
                            "subType": 0,
                            "min": 0,
                            "max": 0,
                            "value": 0
                        },
                        "setting": {
                            "defaultVal": "",
                            "optionRandomType": 0,
                            "position": 0,
                            "isForceResponse": true,
                            "isScore": false,
                            "qstScore": 5,
                            "isShowScore": true,
                            "scoreRuleType": 1,
                            "rightAnswers": [],
                            "rightAnswerScores": []
                        }
                    },
                    {
                        "qstId": 6500940004862976,
                        "qstUuid": "f298b8f9-af0e-4ff9-94ae-21f9bd90dfe6",
                        "type": 1,
                        "qstNo": "Q2",
                        "questionId": "f298b8f9",
                        "questionText": "多选题",
                        "questionType": 2,
                        "qstTip": "",
                        "selector": 2,
                        "subSelector": 0,
                        "appType": 0,
                        "status": 1,
                        "sortNo": 2,
                        "choices": [
                            {
                                "choiceId": 6500940004862977,
                                "choiceUuid": "e94219e1-0677-4e61-af31-777c98f699d0",
                                "choiceNo": 1,
                                "display": "<p>多选项1</p>",
                                "sortNo": 1
                            },
                            {
                                "choiceId": 6500940004862978,
                                "choiceUuid": "cdb673a4-3355-4a86-8574-1051bcb748f0",
                                "choiceNo": 2,
                                "display": "<p>多选项2</p>",
                                "sortNo": 2
                            },
                            {
                                "choiceId": 6500940004862979,
                                "choiceUuid": "f735f4ed-f988-43d2-8249-6618ead79758",
                                "choiceNo": 3,
                                "display": "<p>多选项3</p>",
                                "sortNo": 3
                            },
                            {
                                "choiceId": 6500940004862980,
                                "choiceUuid": "a5f4ceed-b5af-43f8-ad57-ecee4f9cb4d6",
                                "choiceNo": 4,
                                "display": "<p>多选项4</p>",
                                "sortNo": 4
                            }
                        ],
                        "validation": {
                            "type": 0,
                            "subType": 0,
                            "min": 0,
                            "max": 0,
                            "value": 0
                        },
                        "setting": {
                            "defaultVal": "",
                            "optionRandomType": 0,
                            "position": 0,
                            "isForceResponse": true,
                            "isScore": false,
                            "qstScore": 5,
                            "isShowScore": true,
                            "scoreRuleType": 1,
                            "rightAnswers": [],
                            "rightAnswerScores": []
                        }
                    },
                    {
                        "qstId": 6510632190979072,
                        "qstUuid": "a7998f63-b3b2-45e5-9ab6-eb14ced25142",
                        "type": 1,
                        "qstNo": "Q3",
                        "questionId": "a7998f63",
                        "questionText": "下拉题",
                        "questionType": 2,
                        "qstTip": "",
                        "selector": 3,
                        "subSelector": 0,
                        "appType": 0,
                        "status": 1,
                        "sortNo": 3,
                        "choices": [
                            {
                                "choiceId": 6510632190979073,
                                "choiceUuid": "a25ae85b-e64d-4401-9934-f0af91d9cdb6",
                                "choiceNo": 1,
                                "display": "下拉选项1",
                                "sortNo": 1
                            },
                            {
                                "choiceId": 6510632190979074,
                                "choiceUuid": "7aed4850-bd7b-4465-b1fb-74c2ec991dc5",
                                "choiceNo": 2,
                                "display": "下拉选项2",
                                "sortNo": 2
                            }
                        ],
                        "validation": {
                            "type": 0,
                            "subType": 0,
                            "min": 0,
                            "max": 0,
                            "value": 0
                        },
                        "setting": {
                            "defaultVal": "",
                            "optionRandomType": 0,
                            "position": 0,
                            "isForceResponse": true,
                            "isScore": false,
                            "qstScore": 5,
                            "isShowScore": false,
                            "scoreRuleType": 1,
                            "rightAnswers": [],
                            "rightAnswerScores": []
                        }
                    },
                    {
                        "qstId": 6743952354062336,
                        "qstUuid": "f8e71e92dbfa4d95b92764a95a5f81a2",
                        "type": 1,
                        "qstNo": "Q4",
                        "questionId": "f8e71e92",
                        "questionText": "排序题",
                        "questionType": 6,
                        "qstTip": "",
                        "selector": 1,
                        "subSelector": 0,
                        "appType": 0,
                        "status": 1,
                        "sortNo": 4,
                        "choices": [
                            {
                                "choiceId": 6743952354062337,
                                "choiceUuid": "192ed15f950b42ceb08efba2ac72c0ed",
                                "choiceNo": 1,
                                "display": "选项8",
                                "sortNo": 1
                            },
                            {
                                "choiceId": 6743952354062338,
                                "choiceUuid": "50dad562aa874cfdbc818a3b09e0978d",
                                "choiceNo": 2,
                                "display": "选项9",
                                "sortNo": 2
                            },
                            {
                                "choiceId": 6743952354062339,
                                "choiceUuid": "decb02d5e06e4c198cb2438039779400",
                                "choiceNo": 3,
                                "display": "选项10",
                                "sortNo": 3
                            }
                        ],
                        "validation": {
                            "type": 0,
                            "subType": 0,
                            "min": 0,
                            "max": 0,
                            "value": 0
                        },
                        "setting": {
                            "defaultVal": "",
                            "optionRandomType": 0,
                            "isForceResponse": true,
                            "isScore": false
                        }
                    },
                    {
                        "qstId": 6743953227299840,
                        "qstUuid": "9084f0fddb8144c2a99183857cd8ae97",
                        "type": 1,
                        "qstNo": "Q5",
                        "questionId": "9084f0fd",
                        "questionText": "量表题",
                        "questionType": 11,
                        "qstTip": "",
                        "selector": 1,
                        "subSelector": 0,
                        "appType": 0,
                        "status": 1,
                        "sortNo": 5,
                        "choices": [
                            {
                                "choiceId": 6743953227299841,
                                "choiceUuid": "ee88b4c2ec7f4268bc3a79aca7ca5880",
                                "choiceNo": 1,
                                "display": "1",
                                "sortNo": 1
                            },
                            {
                                "choiceId": 6743953227299842,
                                "choiceUuid": "850b597da1c84043bc372953b5f2f33f",
                                "choiceNo": 2,
                                "display": "2",
                                "sortNo": 2
                            },
                            {
                                "choiceId": 6743953227299843,
                                "choiceUuid": "3cfa35fe88cc4e77b4597fa1956a4a17",
                                "choiceNo": 3,
                                "display": "3",
                                "sortNo": 3
                            },
                            {
                                "choiceId": 6743953227299844,
                                "choiceUuid": "092e89be03664d16a21a0ad2e6a8f1f3",
                                "choiceNo": 4,
                                "display": "4",
                                "sortNo": 4
                            },
                            {
                                "choiceId": 6743953227299845,
                                "choiceUuid": "6ecd4801c3524b3cafed8290bc313bae",
                                "choiceNo": 5,
                                "display": "5",
                                "sortNo": 5
                            }
                        ],
                        "answers": [
                            {
                                "answerId": 6743953227299848,
                                "uuid": "b220896949964e1d8fd5e060a05ffba8",
                                "answerNo": 1,
                                "display": "很不满意",
                                "sortNo": 1
                            },
                            {
                                "answerId": 6743953227299849,
                                "uuid": "dcc7c9dae37e459980bb73ba3a9332e9",
                                "answerNo": 2,
                                "display": "很满意",
                                "sortNo": 2
                            }
                        ],
                        "setting": {
                            "defaultVal": "",
                            "isForceResponse": true,
                            "isScore": false
                        }
                    },
                    {
                        "qstId": 6743953728175104,
                        "qstUuid": "eb9ae725e3f54400a5684d7a046b3059",
                        "type": 1,
                        "qstNo": "Q6",
                        "questionId": "eb9ae725",
                        "questionText": "请选择你的生日",
                        "questionType": 1,
                        "qstTip": "",
                        "selector": 5,
                        "subSelector": 0,
                        "appType": 0,
                        "status": 1,
                        "sortNo": 6,
                        "validation": {
                            "type": 0,
                            "subType": 0,
                            "min": 0,
                            "max": 0,
                            "value": 0
                        },
                        "setting": {
                            "defaultVal": "",
                            "isForceResponse": true,
                            "isScore": false,
                            "qstScore": 5,
                            "isShowScore": false,
                            "scoreRuleType": 1,
                            "rightAnswers": [],
                            "rightAnswerScores": []
                        }
                    },
                    {
                        "qstId": 6743954635780096,
                        "qstUuid": "3208d0455b894f71b5308af484dcadee",
                        "type": 1,
                        "qstNo": "Q7",
                        "questionId": "3208d045",
                        "questionText": "单项填空",
                        "questionType": 1,
                        "qstTip": "",
                        "selector": 1,
                        "subSelector": 0,
                        "appType": 0,
                        "status": 1,
                        "sortNo": 7,
                        "validation": {
                            "type": 0,
                            "subType": 0,
                            "min": 0,
                            "max": 0,
                            "value": 0
                        },
                        "setting": {
                            "defaultVal": "",
                            "isForceResponse": true,
                            "isScore": false,
                            "config": {
                                "textRow": 2
                            }
                        }
                    },
                    {
                        "qstId": 6743954904988672,
                        "qstUuid": "ff6e30c3dc224f95b4478f1b54d18bf6",
                        "type": 1,
                        "qstNo": "Q8",
                        "questionId": "ff6e30c3",
                        "questionText": "多项填空",
                        "questionType": 20,
                        "qstTip": "",
                        "selector": 1,
                        "subSelector": 0,
                        "appType": 0,
                        "status": 1,
                        "sortNo": 8,
                        "choices": [
                            {
                                "choiceId": 6743954904988673,
                                "choiceUuid": "de01854848914daa8da337905b6d6af4",
                                "choiceNo": 1,
                                "display": "姓名：",
                                "sortNo": 1,
                                "extend": {
                                    "isTextEntry": false,
                                    "isForceResponse": true,
                                    "isExclusive": false,
                                    "setting": {
                                        "max": "",
                                        "min": "",
                                        "itemType": 1,
                                        "isChoiceForce": true,
                                        "validationType": 0
                                    }
                                }
                            },
                            {
                                "choiceId": 6743958669406208,
                                "choiceUuid": "53e45cadd73443808a1ac2b85e3d628e",
                                "choiceNo": 2,
                                "display": "年龄：",
                                "sortNo": 2,
                                "extend": {
                                    "isTextEntry": false,
                                    "isForceResponse": true,
                                    "isExclusive": false,
                                    "setting": {
                                        "max": "",
                                        "min": "",
                                        "itemType": 1,
                                        "isChoiceForce": true,
                                        "validationType": 0
                                    }
                                }
                            },
                            {
                                "choiceId": 6743958685808640,
                                "choiceUuid": "84e4deb149194b54b00d58fc49eb708f",
                                "choiceNo": 3,
                                "display": "电话：",
                                "sortNo": 3,
                                "extend": {
                                    "isTextEntry": false,
                                    "isForceResponse": true,
                                    "isExclusive": false,
                                    "setting": {
                                        "max": "",
                                        "min": "",
                                        "itemType": 1,
                                        "isChoiceForce": true,
                                        "validationType": 0
                                    }
                                }
                            }
                        ],
                        "validation": {
                            "type": 0,
                            "subType": 0,
                            "min": 0,
                            "max": 0,
                            "value": 0
                        },
                        "setting": {
                            "defaultVal": "",
                            "optionRandomType": 0,
                            "isForceResponse": true,
                            "isScore": false
                        }
                    },
                    {
                        "qstId": 6743957425437696,
                        "qstUuid": "e204758a1f6b4f0ba7dcb422317c0442",
                        "type": 1,
                        "qstNo": "Q9",
                        "questionId": "e204758a",
                        "questionText": "矩阵填空",
                        "questionType": 10,
                        "qstTip": "",
                        "selector": 1,
                        "subSelector": 0,
                        "appType": 0,
                        "status": 1,
                        "sortNo": 9,
                        "choices": [
                            {
                                "choiceId": 6743957425437697,
                                "choiceUuid": "3ae39fdb91ea4acc9d622118bc586072",
                                "choiceNo": 1,
                                "display": "行标题1",
                                "sortNo": 1
                            },
                            {
                                "choiceId": 6743957425437698,
                                "choiceUuid": "8671eef789fa43f29f6ca0c11017ef88",
                                "choiceNo": 2,
                                "display": "行标题2",
                                "sortNo": 2
                            }
                        ],
                        "answers": [
                            {
                                "answerId": 6743957425437700,
                                "uuid": "0321b06d535c4fc5a4b78ae055c4ab79",
                                "answerNo": 2,
                                "colType": 1,
                                "display": "列标题1",
                                "sortNo": 2,
                                "setting": {
                                    "isForceResponse": true
                                }
                            },
                            {
                                "answerId": 6743957979803648,
                                "uuid": "fa094abc771641498e8e357c49344334",
                                "answerNo": 3,
                                "colType": 1,
                                "display": "列标题2",
                                "sortNo": 3,
                                "setting": {
                                    "isForceResponse": true
                                }
                            },
                            {
                                "answerId": 6743959065474048,
                                "uuid": "c21dfb107d50492d9cc415c9071a99ca",
                                "answerNo": 4,
                                "colType": 1,
                                "display": "列标题3",
                                "sortNo": 5,
                                "setting": {
                                    "isForceResponse": true
                                }
                            }
                        ],
                        "validation": {
                            "type": 0,
                            "subType": 0,
                            "min": 0,
                            "max": 0,
                            "value": 0
                        },
                        "setting": {
                            "defaultVal": "",
                            "isMobileAdapter": true,
                            "isForceResponse": true,
                            "isScore": false
                        }
                    },
                    {
                        "qstId": 6743961552025600,
                        "qstUuid": "ed2eeb6552a14be494292904b223f182",
                        "type": 1,
                        "qstNo": "Q10",
                        "questionId": "ed2eeb65",
                        "questionText": "矩阵单选",
                        "questionType": 4,
                        "qstTip": "",
                        "selector": 1,
                        "subSelector": 1,
                        "appType": 0,
                        "status": 1,
                        "sortNo": 10,
                        "choices": [
                            {
                                "choiceId": 6743961552025601,
                                "choiceUuid": "b885be11cf0446269d0d03aa1e04f552",
                                "choiceNo": 1,
                                "display": "行标题1||QBipolarDelim||陈述 1",
                                "sortNo": 1
                            },
                            {
                                "choiceId": 6743961552025602,
                                "choiceUuid": "20383f2d8ecf42529677838719a8dc36",
                                "choiceNo": 2,
                                "display": "行标题2||QBipolarDelim||陈述 2",
                                "sortNo": 2
                            }
                        ],
                        "answers": [
                            {
                                "answerId": 6743961552025608,
                                "uuid": "7d873e2328af49c1859d747a2ef7e82c",
                                "answerNo": 1,
                                "colType": 2,
                                "display": "列选项1",
                                "sortNo": 1
                            },
                            {
                                "answerId": 6743961552025609,
                                "uuid": "2c4b1be8979c49a285519f9221a22005",
                                "answerNo": 2,
                                "colType": 2,
                                "display": "列选项2",
                                "sortNo": 2
                            },
                            {
                                "answerId": 6743961552025610,
                                "uuid": "7adb528d1e934bdd9e39cbe3842b71ac",
                                "answerNo": 3,
                                "colType": 2,
                                "display": "列选项3",
                                "sortNo": 4
                            },
                            {
                                "answerId": 6743961552025611,
                                "uuid": "43ea3e6c47e2474aae59fe068838280c",
                                "answerNo": 4,
                                "colType": 2,
                                "display": "列选项4",
                                "sortNo": 5
                            },
                            {
                                "answerId": 6743961552025612,
                                "uuid": "9469992d3d88400594c4ab4ac0013612",
                                "answerNo": 5,
                                "colType": 2,
                                "display": "列选项5",
                                "sortNo": 6
                            }
                        ],
                        "validation": {
                            "type": 0,
                            "subType": 0,
                            "min": 0,
                            "max": 0,
                            "value": 0
                        },
                        "setting": {
                            "defaultVal": "",
                            "optionRandomType": 0,
                            "position": 0,
                            "isMobileAdapter": true,
                            "isForceResponse": true,
                            "isScore": false
                        }
                    },
                    {
                        "qstId": 6743964322099200,
                        "qstUuid": "ae317e2dd03a404c93c59ff4090e8604",
                        "type": 1,
                        "qstNo": "Q11",
                        "questionId": "ae317e2d",
                        "questionText": "矩阵多选",
                        "questionType": 4,
                        "qstTip": "",
                        "selector": 1,
                        "subSelector": 2,
                        "appType": 0,
                        "status": 1,
                        "sortNo": 11,
                        "choices": [
                            {
                                "choiceId": 6743964322115584,
                                "choiceUuid": "0e8b2dd1dbb54836a8e02a4130c0b5c6",
                                "choiceNo": 1,
                                "display": "行标题1||QBipolarDelim||陈述 1",
                                "sortNo": 1
                            },
                            {
                                "choiceId": 6743964322115585,
                                "choiceUuid": "4f1c4c5757224dd496eedab072df906e",
                                "choiceNo": 2,
                                "display": "行标题2||QBipolarDelim||陈述 2",
                                "sortNo": 2
                            },
                            {
                                "choiceId": 6743964322115586,
                                "choiceUuid": "0b61d592530c4a52a6a285d9646b6edc",
                                "choiceNo": 3,
                                "display": "行标题3||QBipolarDelim||陈述 3",
                                "sortNo": 3
                            }
                        ],
                        "answers": [
                            {
                                "answerId": 6743964322115591,
                                "uuid": "ad8e12a895614e0e8de52de1aa007cd9",
                                "answerNo": 1,
                                "colType": 2,
                                "display": "列选项1",
                                "sortNo": 1
                            },
                            {
                                "answerId": 6743964322115592,
                                "uuid": "8488fcaa34da4314a4b4f8ff86c4faab",
                                "answerNo": 2,
                                "colType": 2,
                                "display": "列选项2",
                                "sortNo": 2
                            },
                            {
                                "answerId": 6743964322115593,
                                "uuid": "98d260b395eb4bb9b7ef1ac56d1f4dcf",
                                "answerNo": 3,
                                "colType": 2,
                                "display": "列选项3",
                                "sortNo": 3
                            },
                            {
                                "answerId": 6743964322115594,
                                "uuid": "86e936d961714fbcb20640aa28856acb",
                                "answerNo": 4,
                                "colType": 2,
                                "display": "列选项4",
                                "sortNo": 4
                            }
                        ],
                        "validation": {
                            "type": 0,
                            "subType": 0,
                            "min": 0,
                            "max": 0,
                            "value": 0
                        },
                        "setting": {
                            "defaultVal": "",
                            "optionRandomType": 0,
                            "position": 0,
                            "isMobileAdapter": true,
                            "isForceResponse": true,
                            "isScore": false
                        }
                    },
                    {
                        "qstId": 6743968263895040,
                        "qstUuid": "a2a36a37b7d046a2a935aebdad856d1a",
                        "type": 1,
                        "qstNo": "Q12",
                        "questionId": "a2a36a37",
                        "questionText": "矩阵滑动条",
                        "questionType": 5,
                        "qstTip": "",
                        "selector": 1,
                        "subSelector": 0,
                        "appType": 0,
                        "status": 1,
                        "sortNo": 12,
                        "choices": [
                            {
                                "choiceId": 6743968263895041,
                                "choiceUuid": "84a5307890354666ac62d928edac30e9",
                                "choiceNo": 1,
                                "display": "行陈述1",
                                "sortNo": 1
                            },
                            {
                                "choiceId": 6743968473657344,
                                "choiceUuid": "72085dedab8f497192eed3127c949b7b",
                                "choiceNo": 2,
                                "display": "行陈述2",
                                "sortNo": 2
                            }
                        ],
                        "answers": [
                            {
                                "answerId": 6743968263895042,
                                "uuid": "442aca6ad2154a208e224085efb5383e",
                                "answerNo": 1,
                                "colType": 2,
                                "display": "标签1",
                                "sortNo": 1
                            },
                            {
                                "answerId": 6743968263895043,
                                "uuid": "cc510999f81346b1898282856d74ce6e",
                                "answerNo": 2,
                                "colType": 2,
                                "display": "标签2",
                                "sortNo": 2
                            }
                        ],
                        "validation": {
                            "type": 3,
                            "subType": 8,
                            "min": 0,
                            "max": 100,
                            "value": 0
                        },
                        "setting": {
                            "defaultVal": "",
                            "isForceResponse": true,
                            "isScore": false
                        }
                    },
                    {
                        "qstId": 6743969311062016,
                        "qstUuid": "3d419d0edd83436e82af36ff4903a659",
                        "type": 1,
                        "qstNo": "Q13",
                        "questionId": "3d419d0e",
                        "questionText": "滑动条",
                        "questionType": 5,
                        "qstTip": "",
                        "selector": 1,
                        "subSelector": 0,
                        "appType": 0,
                        "status": 1,
                        "sortNo": 13,
                        "choices": [
                            {
                                "choiceId": 6743969311062017,
                                "choiceUuid": "ec2db6858736470db0f73d22af8456ab",
                                "choiceNo": 1,
                                "display": "行陈述1",
                                "sortNo": 1
                            }
                        ],
                        "answers": [
                            {
                                "answerId": 6743969311062018,
                                "uuid": "17efbd995e1b4c40972d11af3126b7f2",
                                "answerNo": 1,
                                "colType": 2,
                                "display": "标签1",
                                "sortNo": 1
                            },
                            {
                                "answerId": 6743969311062019,
                                "uuid": "a76e7e1e59d44742ac65a74f3a1ce136",
                                "answerNo": 2,
                                "colType": 2,
                                "display": "标签2",
                                "sortNo": 2
                            }
                        ],
                        "validation": {
                            "type": 3,
                            "subType": 8,
                            "min": 0,
                            "max": 100,
                            "value": 0
                        },
                        "setting": {
                            "defaultVal": "",
                            "isForceResponse": true,
                            "isScore": false
                        }
                    }
                ],
                "blockOption": {
                    "randomType": 0,
                    "totalNum": 0
                }
            }
        ],
        "surFlow": {
            "type": 1,
            "flowList": [
                {
                    "flowId": 6400594159154176,
                    "blockId": 1197124,
                    "type": 2,
                    "subSet": 0,
                    "parentId": 0,
                    "level": 0,
                    "description": "",
                    "sortNo": 4,
                    "flowList": []
                },
                {
                    "flowId": 6500958592904192,
                    "blockId": -1,
                    "type": 2,
                    "subSet": 0,
                    "parentId": 0,
                    "level": 0,
                    "description": "",
                    "sortNo": 4,
                    "flowList": []
                }
            ]
        },
        "trash": {
            "blockId": 904095,
            "type": 3,
            "subType": 0,
            "description": "垃圾箱",
            "sortNo": 1,
            "blockElements": [
                {
                    "qstId": 6743961318191104,
                    "qstUuid": "ef3a28bbe93d4499b4ffa8b9131c202b",
                    "type": 1,
                    "qstNo": "Q10",
                    "questionId": "ef3a28bb",
                    "questionText": "",
                    "questionType": 4,
                    "qstTip": "",
                    "selector": 3,
                    "subSelector": 1,
                    "appType": 0,
                    "status": 2,
                    "sortNo": 1,
                    "choices": [
                        {
                            "choiceId": 6743961318191105,
                            "choiceUuid": "435fbe3e7fad40e794e53527f9fbc9a0",
                            "choiceNo": 1,
                            "qstId": 6743961318191104,
                            "display": "陈述 1",
                            "sortNo": 1
                        },
                        {
                            "choiceId": 6743961318191106,
                            "choiceUuid": "3c3406838ea84d6682492acdb11b7a96",
                            "choiceNo": 2,
                            "qstId": 6743961318191104,
                            "display": "陈述 2",
                            "sortNo": 2
                        }
                    ],
                    "answers": [
                        {
                            "answerId": 6743961318191107,
                            "uuid": "39d6bf725c5b4cff989ca6af5cc4c468",
                            "answerNo": 1,
                            "qstId": 6743961318191104,
                            "colType": 2,
                            "display": "选项 1",
                            "sortNo": 1
                        },
                        {
                            "answerId": 6743961318191108,
                            "uuid": "b40d2415f144410e98df324844749ce3",
                            "answerNo": 2,
                            "qstId": 6743961318191104,
                            "colType": 2,
                            "display": "选项 2",
                            "sortNo": 2
                        },
                        {
                            "answerId": 6743961318191109,
                            "uuid": "58d867445c4e4d74a578f2b542c623f4",
                            "answerNo": 3,
                            "qstId": 6743961318191104,
                            "colType": 2,
                            "display": "选项 3",
                            "sortNo": 3
                        },
                        {
                            "answerId": 6743961318191110,
                            "uuid": "cf81c9bd241e40f8b29cc0d40044146f",
                            "answerNo": 4,
                            "qstId": 6743961318191104,
                            "colType": 2,
                            "display": "选项 4",
                            "sortNo": 4
                        }
                    ],
                    "validation": {
                        "qstId": 6743961318191104,
                        "qstUuid": "ef3a28bbe93d4499b4ffa8b9131c202b",
                        "type": 0,
                        "subType": 0,
                        "min": 0,
                        "max": 0,
                        "value": 0
                    },
                    "setting": {
                        "defaultVal": "",
                        "qstId": 6743961318191104,
                        "optionRandomType": 0,
                        "position": 0,
                        "isMobileAdapter": true,
                        "isForceResponse": true,
                        "isScore": false
                    }
                },
                {
                    "qstId": 6743968090586112,
                    "qstUuid": "33600891400a4727942c7b0bc41b7d91",
                    "type": 1,
                    "qstNo": "Q12",
                    "questionId": "33600891",
                    "questionText": "",
                    "questionType": 10,
                    "qstTip": "",
                    "selector": 1,
                    "subSelector": 0,
                    "appType": 0,
                    "status": 2,
                    "sortNo": 2,
                    "choices": [
                        {
                            "choiceId": 6743968090586113,
                            "choiceUuid": "740a8c5eec1841bda1d982e0f6b5073c",
                            "choiceNo": 1,
                            "qstId": 6743968090586112,
                            "display": "陈述 1",
                            "sortNo": 1
                        },
                        {
                            "choiceId": 6743968090586114,
                            "choiceUuid": "516c6fed9aea4bbba95104ff4f23f3b3",
                            "choiceNo": 2,
                            "qstId": 6743968090586112,
                            "display": "陈述 2",
                            "sortNo": 2
                        }
                    ],
                    "answers": [
                        {
                            "answerId": 6743968090586115,
                            "uuid": "bbffc809b4fd4ce785417bc3b63133ae",
                            "answerNo": 1,
                            "qstId": 6743968090586112,
                            "colType": 1,
                            "display": "选项 1",
                            "sortNo": 1,
                            "setting": {
                                "isForceResponse": true
                            }
                        },
                        {
                            "answerId": 6743968090586116,
                            "uuid": "3c361a90198f4bcc94846317b4a3f254",
                            "answerNo": 2,
                            "qstId": 6743968090586112,
                            "colType": 4,
                            "display": "选项 2",
                            "sortNo": 2,
                            "setting": {
                                "isForceResponse": true
                            },
                            "items": [
                                {
                                    "itemNo": 0,
                                    "answerId": 6743968090586116,
                                    "display": "答案 1"
                                }
                            ]
                        }
                    ],
                    "validation": {
                        "qstId": 6743968090586112,
                        "qstUuid": "33600891400a4727942c7b0bc41b7d91",
                        "type": 0,
                        "subType": 0,
                        "min": 0,
                        "max": 0,
                        "value": 0
                    },
                    "setting": {
                        "defaultVal": "",
                        "qstId": 6743968090586112,
                        "isMobileAdapter": true,
                        "isForceResponse": true,
                        "isScore": false
                    }
                }
            ],
            "blockOption": {
                "randomType": 0,
                "totalNum": 0
            }
        }
    }

    //获取json长度
    const getJsonLength = function (jsonData) {
        //return Object.keys(jsonData).length;
        var jsonLength = 0;
        for (var item in jsonData) {
            jsonLength++;
        }
        return jsonLength;
    }

    //获取类型
    const getType = function (data) {
        if (0 == data.questionType && 2 == data.type) {//分页节点，和微软forms一样处理成占位题
            return "占位题";
        }
        if (1 == data.questionType) {
            if (7 == data.selector) {//随机数题，产生1~1000的随机数，只显示，人无法作答，提交的answerContent为该随机数
            }
            return "填空";

        } else if (2 == data.questionType) {
            if (1 == data.selector) {
                return "单选";
            } else if (2 == data.selector) {
                return "多选";
            } else if (3 == data.selector) {
                return "下拉选项";
            }
        } else if (3 == data.questionType) {//图文说明题，由于不具有填写时"文本框"属性--只显示，只能编辑时有此属性故而标记为占位；提交的answerContent为1
            return "占位题";
        } else if (4 == data.questionType) {
            if (1 == data.subSelector) {
                return "矩阵单选";
            } else if (2 == data.subSelector) {
                return "矩阵多选";
            } else {
                return "矩阵量表-未知";
            }
        } else if (5 == data.questionType) {
            let choicesNum = data.choices.length;
            if (choicesNum > 1) { // 矩阵滑动（多个滑动）
                return "矩阵滑动";
            } else {//单个滑动
                return "滑动条";
            }
        } else if (6 == data.questionType) {
            return "排序选择";
        } else if (7 == data.questionType) {//暂未见过
            return "cbcMatrix";
        } else if (8 == data.questionType) {//暂未见过
            return "cbcChoice";
        } else if (9 == data.questionType) {//"街道地址";//比如城市街道地址选择，可归为级联下拉，也可简单归为下拉选项
            return "填空";
        } else if (10 == data.questionType) {
            if (!data.hasOwnProperty("answers")) {
                return "未知矩阵";
            }
            if (1 == data.answers[0].colType) {
                return "矩阵填空";
            } else if (2 == data.answers[0].colType) {
                return "矩阵单选";
            } else if (4 == data.answers[0].colType) {//矩阵下拉框
                return "未知矩阵";
            }
        } else if (11 == data.questionType) {
            //if(1==data.selector) {
            //    return "Scale";//可选中R角矩形框
            //} else if(2==data.selector) {
            //    return "NPS";//常用量表
            //}
            return "量表";
        } else if (12 == data.questionType) {
            if (1 == data.selector) {
                return "文件上传";
            } else if (2 == data.selector) {
                return "手写签名";
            } else if (3 == data.selector) {
                return "录音";
            }
        } else if (15 == data.questionType) {//"级联下拉";//也可简单归为下拉选项或填空
            return "填空";
        } else if (16 == data.questionType) {//即累加计数
            return "恒定总和";
        } else if (18 == data.questionType) {//可用鼠标对图进行下标记
            return "热力图";
        } else if (20 == data.questionType) {//多项填空
            return "填空";
        } else if (22 == data.questionType) {//分类题
            return "分类题";
        } else {
            return "未知";
        }
    }

    //构建矩阵选项数据
    const buildMatrixData = function (inner, preTitle, oneChoice, answers) {
        var answersLength = getJsonLength(answers);
        //let tmpArr = new Array();
        for (var i = 0; i < answersLength; i++) {
            let tmpObj = new Object();
            const val = i + 1; //answers[i].sortNo; //answerNo;
            //tmpObj.title = preTitle + "_" + answers[i].display.replace(/<p>/g, "").replace(/<\/p>/g, "").replace(/<br>/g, "").replace(/_/g, "").replace(/\t/g, "") + "_" + val;
            tmpObj.title = preTitle + "_" + answers[i].answerId + "_" + answers[i].display;//格式：行名_列id_列名
            tmpObj.optionId = oneChoice.choiceId + "_" + answers[i].answerId + "_" + val;//格式：行ID_列ID_序号
            tmpObj.value = val;
            inner.push(tmpObj);//tmpArr.push(tmpObj);
        }
        // tmpArr.sort((a,b)=>{ //按value排序
        //     return a.value - b.value
        // });
        // let tmpArrLength = getJsonLength(tmpArr);
        // for(let i = 0; i<tmpArrLength; i++){
        //     tmpArr[i].value = i+1;
        // }
        // inner.push(...tmpArr); //合并到inner数组
    }

    //获取选项
    const getOptions = function (data) {
        var inner = new Array();
        var optionsLength = getJsonLength(data.choices);
        for (var i = 0; i < optionsLength; i++) {
            let tmpObj = new Object();
            let isMatrix = false;

            var choiceTitle = data.choices[i].display.replace(/<p>/g, "").replace(/<\/p>/g, "").replace(/<br>/g, "").replace(/_/g, "");
            switch (data.questionType) {
                case 2://选择类（包含单选，多选，下拉选）
                    if (data.choices[i].hasOwnProperty("extend")) {
                        tmpObj.title = choiceTitle + "|underline";
                    } else {
                        tmpObj.title = choiceTitle;
                    }
                    tmpObj.optionId = data.choices[i].choiceId.toString();
                    break;
                case 5://滑动条
                    let choicesNum = data.choices.length;
                    let minVal = data.validation.min;
                    let maxVal = data.validation.max;
                    if (choicesNum > 1) { // 矩阵滑动（多个滑动）
                        tmpObj.title = choiceTitle + "_" + minVal + "_" + maxVal;
                    } else {//单个滑动
                        tmpObj.title = choiceTitle;
                    }
                    tmpObj.optionId = data.choices[i].choiceId.toString();
                    break;
                case 6://排序
                case 11://量表
                case 16://恒定总和
                    tmpObj.title = choiceTitle;
                    tmpObj.optionId = data.choices[i].choiceId.toString();
                    break;
                case 4://矩阵量表
                case 10://矩阵相关
                    if (!data.hasOwnProperty("answers")) {
                        break;
                    }
                    var preTitle = choiceTitle;
                    var stopIdx = choiceTitle.indexOf("||");
                    if (-1 != stopIdx) {
                        preTitle = choiceTitle.substring(0, stopIdx);
                    }
                    buildMatrixData(inner, preTitle, data.choices[i], data.answers);
                    isMatrix = true;
                    break;
                // case 15://级联题（更趋向于填空？）
                //     tmpObj.title = data.expand.content.optionData.title; 
                //     tmpObj.optionId = null; 
                //     break;
                default:
                    break;
            }
            //tmpObj.title = data.choices[i].display; // 选项标题：注意， ‘_’ 符号有特殊用途， ‘|underline’表示选项有填空 。若为矩阵题使用 “主标题_分值_打分标题”的格式
            //tmpObj.optionId = data.choices[i].choiceId; // 选项id，提交用                    
            tmpObj.value = data.choices[i].choiceNo; // 选项对应的分值（打分使用，若无特殊定义，可以赋值-1.），当前用于relation选项特殊用途
            if (false == isMatrix) {
                inner.push(tmpObj);
            }
        }
        return inner;
    }

    //当前为未选定则将其他选项设为选定
    const setData2OtherOption = function (data, jumpData, dstId, choiceLocator) {
        var choiseLength = getJsonLength(data.choices);
        for (var i = 0; i < choiseLength; i++) {
            if (data.choices[i].choiceNo == choiceLocator) {
                continue;
            }
            let jmpObj = new Object();
            jmpObj.condition = 1;
            jmpObj.destId = dstId;
            jmpObj.optionId = data.choices[i].choiceId.toString();
            jumpData.push(jmpObj);
        }
    }

    //获取跳题数据
    const getJumpData = function (data, type) {
        var jumpData = new Array()
        var slLength = getJsonLength(data.skipLogic);
        for (var i = 0; i < slLength; i++) {
            let cond = data.skipLogic[i].condition;//跳转条件：1选定；2未选定
            let dstId = data.skipLogic[i].skipToDestination.toString(); // 跳转的id。跳到结束赋值'-1'或'0';
            if (2 == cond && ("单选" == type || "下拉选项" == type)) {//如果当前为“未选定”且为单选或下拉选，则将其他选项设为选定
                setData2OtherOption(data, jumpData, dstId, data.skipLogic[i].choiceLocator);
            } else if ('量表' == type) {//量表有跳题暂时不支持，临时处理为设置类型为：量表跳题
                let jmpObj = new Object();
                jmpObj.condition = cond;
                jmpObj.destId = dstId;
                jmpObj.optionId = '量表跳题';
                jumpData.push(jmpObj);
            } else if ('ENDOFERROR' == dstId) {//检测题，选中choiceLocator对应的则检测通过 无跳转继续作答，设置其他项选中跳转到结束答题；
                setData2OtherOption(data, jumpData, dstId, data.skipLogic[i].choiceLocator);
            } else {//选定
                let jmpObj = new Object();
                jmpObj.condition = cond;
                jmpObj.destId = dstId;
                jmpObj.optionId = getJumpOptionId(data, data.skipLogic[i].choiceLocator); // 选中选项id，选中才跳转。
                jumpData.push(jmpObj);
            }
        }
        return jumpData;
    }

    //获取跳题的选中选项id
    const getJumpOptionId = function (data, choiceLocator) {
        var choiseLength = getJsonLength(data.choices);
        for (var i = 0; i < choiseLength; i++) {
            if (data.choices[i].choiceNo == choiceLocator) {
                return data.choices[i].choiceId.toString();
            }
        }
    }

    //获取 destId
    const getDstId = function (dstId) {
        if (undefined == dstId || null == dstId) {
            return dstId;
        }
        return dstId.toString();
    }

    //更新跳转逻辑题号
    const updateSkipLogic = function (logicDict4skip, dataArray, blockJumpDick) {
        let jsonLen = getJsonLength(dataArray);
        for (let i = 0; i < jsonLen; i++) {
            if (dataArray[i].hasJump) {//跳转逻辑题
                let jumpDataLen = getJsonLength(dataArray[i].jumpData);
                let tmpUnselected = null;
                for (let j = 0; j < jumpDataLen; j++) {
                    let questionId = dataArray[i].jumpData[j].destId;
                    dataArray[i].jumpData[j].destId = getDstId(logicDict4skip[questionId]);
                    //destId没有包含3种情况：
                    //1.ENDOFBLOCK代表当前块结束，赋值下一个块的第一道题；
                    //2.ENDOFSURVEY代表整个问卷结束，赋值'-1'；
                    //3.ENDOFERROR代表如果没有通过验证，会结束问卷并提交（赋值'-1'）；如果通过验证则继续答下一题
                    if (null == dataArray[i].jumpData[j].destId) {
                        if ('ENDOFBLOCK' == questionId) {
                            dataArray[i].jumpData[j].destId = blockJumpDick[dataArray[i].qid];
                        } else if ('ENDOFSURVEY' == questionId) {
                            dataArray[i].jumpData[j].destId = '-1';
                        } else if ('ENDOFERROR' == questionId) {//前面获取跳题数据中已设置其他项数据（类似未选定），这里改为结束问卷就行
                            dataArray[i].jumpData[j].destId = '-1';
                        } else {//未知的，这里都作问卷出错处理
                            dataArray[i].jumpData[j].destId = 'error';
                        }
                    }

                    // 单选或下拉包含"未选定"，后续选项 保持和它一致
                    if (null != tmpUnselected) {
                        dataArray[i].jumpData[j] = tmpUnselected;
                    }
                    //处理逻辑：若是多选且包含"未选定"则返回NOT_SUPPORT；若是单选或下拉包含"未选定"，则该题后面的逻辑都按此未选定跳转
                    if (-1 != dataArray[i].type.indexOf("多选") && 2 == dataArray[i].jumpData[j].condition) {
                        dataArray[i].jumpData[j].destId = "NOT_SUPPORT";
                    } else if (-1 != dataArray[i].type.indexOf("单选") || -1 != dataArray[i].type.indexOf("下拉")) {
                        if (2 == dataArray[i].jumpData[j].condition) {//未选定
                            tmpUnselected = dataArray[i].jumpData[j];
                        }
                    }
                    delete dataArray[i].jumpData[j].condition; //移除跳转条件属性
                }
            }
        }
    }

    //更新显示逻辑题号
    const updateDisplayLogic = function (logicDict4display, dataArray) {
        let jsonLen = getJsonLength(dataArray);
        let topicDict = { 1: "|", 2: "$" };//根据框架依照问卷星规则：逻辑与用|，逻辑或用$
        let optionDict = { 1: ".", 2: ";" };
        let operDict = { 1: "", 2: "-" }
        for (let i = 0; i < jsonLen; i++) {
            if (!dataArray[i].hasOwnProperty("relation") || '' == dataArray[i].relation) {//显示逻辑题才可往后运行
                continue;
            }
            let result = "";
            let retDict = [];
            let displayLogicArr = dataArray[i].relation;
            let displayLogicLen = getJsonLength(displayLogicArr);
            let firstKey = null;
            for (let k = 0; k < displayLogicLen; k++) {
                let sourceQuestionId = displayLogicArr[k].sourceQuestionId;
                let conjuction = displayLogicArr[k].conjuction;//逻辑连词，逻辑操作 1与 2或
                let operator = displayLogicArr[k].operator;//1选定；2未选定
                let topicNo = logicDict4display[sourceQuestionId] + "";//题号
                let choice = displayLogicArr[k].choiceLocator;

                if (0 == k) {//第一个不加逻辑连词
                    retDict[topicNo] = topicNo + "," + operDict[operator] + choice;
                    firstKey = topicNo;
                } else {
                    if (undefined == retDict[topicNo]) {//没有出现过该题号
                        retDict[topicNo] = topicDict[conjuction] + topicNo + "," + operDict[operator] + choice;
                    } else {//出现过该题号，则拼接题项
                        let tmp = retDict[topicNo];
                        retDict[topicNo] = tmp + optionDict[conjuction] + operDict[operator] + choice;
                    }
                }
            }
            for (let key in retDict) {
                if (key != firstKey) {
                    result = result + retDict[key];
                } else {
                    result = retDict[key] + result;
                }
            }
            dataArray[i].relation = result;
        }
    }

    //情景题构建
    const buildScene = function () { // deprecated
        let tmp = new Object();
        tmp.id = 0;
        tmp.qid = '';
        tmp.range = null;
        tmp.relation = '';
        tmp.inner = null;
        tmp.isRequired = true;
        tmp.title = '';
        tmp.hasJump = false;
        tmp.jumpData = null;

        tmp.type = "情景题";
        return tmp;
    }

    //获取场景题(也叫随机题)BlockIds数组
    const getSceneBlockIdArr = function (secondFlowList) {
        let sceneBlockIdArr = new Array();
        for (let i = 0; i < secondFlowList.length; i++) {
            sceneBlockIdArr.push(secondFlowList[i].blockId);
        }
        return sceneBlockIdArr;
    }

    // 获取系统类型
    const traslateType = function (type, srcType) {
        if ("单选" == type) {
            return "SINGLE";
        } else if ("多选" == type) {
            return "MULTIPLE";
        } else if ("下拉选项" == type) {
            return "SINGLE_SELECT";
        } else if ("排序选择" == type) {
            return "SORTED";
        } else if ("量表" == type) {
            return "SCALE";
        } else if ("矩阵单选" == type | "矩阵量表" == type) {
            return "MATRIX";
        } else if ("矩阵多选" == type) {
            return "MULTIPLE_MATRIX";
        } else if ("滑动条" == type) {
            return "SINGLE_SLIDE";
        } else if ("矩阵滑动" == type) {
            return "SLIDE";
        } else if ("比重" == type) {
            return "RATE";
        } else if ("填空" == type) {
            if ("1_1_5_0" == srcType) {//日期题
                return "DATE";
                // } else if() {//地区题
                //     return "AREA";
            } else if ("1_20_1_0" == srcType) {//"多项填空"
                return "MULTIPLE_TEXT";
            } else if (srcType.startsWith("1_15_")) {//级联题
                return "CASCADE_DROPDOWN";
            } else if (srcType.startsWith("1_9_")) {//第二种级联题
                return "CASCADE_DROPDOWN";
            } else {
                return "TEXT";
            }
        } else if ("矩阵填空" == type) {
            return "MATRIX_TEXT";
        } else if ("占位题" == type) {
            return "DESCRIPTION";
        } else {
            return type;
        }
    }

    // 转译是否必须：0代表非必填；1代表必填
    const traslateRequired = function (isReq) {
        if (isReq) { //必填
            return '1';
        }
        return '0';
    }

    // 判断是否为填空类题型
    const isText = function (curQst) {
        if ("TEXT" == curQst.sys_type || "DATE" == curQst.sys_type || "MULTIPLE_TEXT" == curQst.sys_type || "MATRIX_TEXT" == curQst.sys_type) {
            return true;
        }
        return false;
    }

    // 设置最大最小值，如果存在的话
    const setMaxAndMinIfExist = function (curQst, range) {
        if("SCALE" == curQst.sys_type) { //量表不设置max和min
            return;
        }
        if (undefined == range || null == range) {
            return;
        }
        curQst.min_oper_num = range.minvalue;
        curQst.max_oper_num = range.maxvalue;
    }

    // 设置选项维度跳题逻辑，如果存在的话
    const setJumpOnOptIfExist = function(curQst, option, jumpDict) {
        let optVal = jumpDict[option.value];
        if(curQst.is_jump && undefined != optVal) {
            option.is_jump = true; // 是否跳题
            option.jump_to = optVal; // 跳到第几题
        }
    }

    // 获取option的is_text字段值
    const getOptionIsText = function (curQst, optName) {
        if ("SINGLE" == curQst.sys_type || "MULTIPLE" == curQst.sys_type) {
            if(optName.endsWith('|underline')) {
                return 1;//return true; //问卷星里竟然是数字1，无填空是返回false
            }
        }
        return curQst.is_text; 
    }

    // 转译选项
    const tanslateOptions = function (optionList, curQst, srcQstData, dataIndexDict, jumpDict) {
        let optArr = new Array();
        let len = getJsonLength(optionList);
        //{"lastDataIndex" : 0, "curQstDataIndex":[]};
        let lastDataIndex = dataIndexDict["lastDataIndex"];
        for (let i = 0; i < len; i++) {
            let option = new Object();
            option.tid = curQst.tid; //题目计数序号-和题目外部一样
            option.title_id = curQst.title_id; // 题目标题id-和题目外部一样
            option.title_type = curQst.title_type; // 和题目外部一样
            option.sys_type = curQst.sys_type; // 和题目外部一样
            option.name = optionList[i].title; // 题目的选项名称
            option.value = (i+1).toString(); // 题目的选项值
            option.real_value = optionList[i].optionId; // 问卷提交对应的值

            option.title = curQst.title + option.name; // 改成和问卷星解析一样：题目标题+选项名称
            option.is_jump = false; // 是否跳题
            option.jump_to = ""; // 跳到第几题
            setJumpOnOptIfExist(curQst, option, jumpDict); //设置选项维度跳题逻辑，如果存在的话

            option.req = curQst.req; // 是否必须 - 和题目外部一样
            option.is_text = getOptionIsText(curQst, option.name); // 是否需要填空
            option.relation = ""; // 关联 - 内部不需要这个字段
            option.min_oper_num = curQst.min_oper_num; // 最小值
            option.max_oper_num = curQst.max_oper_num; // 最大值
            option.rate = 0; // 权重 - 默认0 - 非问卷解析字段
            option.text = ""; // 填空内容 - 默认空字符串 - 非问卷解析字段
            option.is_reverse = false; // 是否反向 - 默认false
            option.options = []; // 选项
            option.children = []; // 针对矩阵or多填
            if ("MULTIPLE" == curQst.sys_type || "SORTED" == curQst.sys_type) {//多选每个选项都要有索引
                option.data_index = lastDataIndex + i; // 数据库索引
                dataIndexDict["curQstDataIndex"].push(lastDataIndex + i);
            } else {
                option.data_index = lastDataIndex; // 数据库索引
            }
            option.is_repeat = false; // 是否去重 - 解析默认false
            optArr.push(option);
        }
        if ("MULTIPLE" == curQst.sys_type || "SORTED" == curQst.sys_type) {
            dataIndexDict["lastDataIndex"] = lastDataIndex + len;
        } else if("DESCRIPTION" == curQst.sys_type) {
            //描述类占位题不生成dataIndexDict值
        } else {
            dataIndexDict["curQstDataIndex"].push(lastDataIndex);
            dataIndexDict["lastDataIndex"] = lastDataIndex + 1;
        }
        return optArr;
    }

    // 构建填空option
    const buildTextOption = function (curQst, dataIndexDict) {
        let lastDataIndex = dataIndexDict["lastDataIndex"];
        let option = new Object();
        option.tid = curQst.tid; //题目计数序号-和题目外部一样
        option.title_id = curQst.title_id; // 题目标题id-和题目外部一样
        option.title = curQst.title; // 和题目外部一样
        option.title_type = curQst.title_type; // 和题目外部一样
        option.sys_type = curQst.sys_type; // 和题目外部一样
        option.name = ""; // 题目的选项名称
        option.value = "1";
        option.real_value = ""; // 问卷提交对应的值
        option.is_jump = false; // 是否跳题
        option.jump_to = ""; // 跳到第几题
        option.req = curQst.req; // 是否必须 - 和题目外部一样
        option.is_text = curQst.is_text; // 是否需要填空 - 默认false
        option.relation = ""; // 关联 - 内部不需要这个字段
        option.min_oper_num = curQst.min_oper_num; // 最小值
        option.max_oper_num = curQst.max_oper_num; // 最大值
        option.rate = 0; // 权重 - 默认0 - 非问卷解析字段
        option.text = ""; // 填空内容 - 默认空字符串 - 非问卷解析字段
        option.is_reverse = false; // 是否反向 - 默认false
        option.options = []; // 选项
        option.children = []; // 针对矩阵or多填
        option.data_index = lastDataIndex; // 数据库索引
        option.is_repeat = false; // 是否去重 - 解析默认false
        dataIndexDict["curQstDataIndex"].push(lastDataIndex);
        dataIndexDict["lastDataIndex"] = lastDataIndex + 1;
        return option;
    }

    // 获取矩阵多选的子节点选项
    const getChildOptionOnly4MultiMatrix = function(len, curQst, oldData, dataIndexDict) {
        let lastDataIndex = dataIndexDict["lastDataIndex"];
        let optArr = new Array();
        for (let i = 0; i < len; i++) {
            let option = new Object();
            option.tid = curQst.tid; //题目计数序号-和题目外部一样
            option.title_id = curQst.title_id; // 题目标题id-和题目外部一样
            option.title = curQst.title + oldData.srcQstData.answers[i].display; // 父题目+本title
            option.title_type = curQst.title_type; // 和题目外部一样
            option.sys_type = curQst.sys_type; // 和题目外部一样
            option.name = oldData.srcQstData.answers[i].display; // 题目的选项名称
            option.value = (i+1).toString(); // 题目的选项值
            option.real_value = oldData.srcQstData.answers[i].answerId; // 问卷提交对应的值
            option.is_jump = false; // 是否跳题
            option.jump_to = ""; // 跳到第几题
            option.req = curQst.req; // 是否必须 - 和题目外部一样
            option.is_text = curQst.is_text; // 是否需要填空 - 默认false
            option.relation = ""; // 关联 - 内部不需要这个字段
            option.min_oper_num = 0; // 最小值
            option.max_oper_num = 0; // 最大值
            option.rate = 0; // 权重 - 默认0 - 非问卷解析字段
            option.text = ""; // 填空内容 - 默认空字符串 - 非问卷解析字段
            option.is_reverse = false; // 是否反向 - 默认false
            option.options = []; // 选项
            option.children = []; // 针对矩阵题or多填
            option.data_index = lastDataIndex + i; // 数据库索引
            option.is_repeat = false; // 是否去重 - 解析默认false
            optArr.push(option);
            dataIndexDict["curQstDataIndex"].push(lastDataIndex + i);
        }
        dataIndexDict["lastDataIndex"] = lastDataIndex + len;
        return optArr;
    }

    // 获取子节点选项（只针对矩阵or多填）
    const getChildOption = function (maxNum, curQst, oldData) {
        let optArr = new Array();
        if ("MULTIPLE_TEXT" == curQst.sys_type || "SLIDE" == curQst.sys_type || "SINGLE_SLIDE" == curQst.sys_type) { // 多项填空or矩阵滑动条或滑动条
            let option = new Object();
            option.tid = curQst.tid; //题目计数序号-和题目外部一样
            option.title_id = curQst.title_id; // 题目标题id-和题目外部一样
            option.title = curQst.title; // 父题目
            option.title_type = curQst.title_type; // 和题目外部一样
            option.sys_type = curQst.sys_type; // 和题目外部一样
            option.name = curQst.name; // 题目的选项名称
            option.value = curQst.value;
            option.real_value = curQst.real_value; // 问卷提交对应的值
            option.is_jump = false; // 是否跳题
            option.jump_to = ""; // 跳到第几题
            option.req = curQst.req; // 是否必须 - 和题目外部一样
            option.is_text = curQst.is_text; // 是否需要填空 - 默认false
            option.relation = ""; // 关联 - 内部不需要这个字段
            option.min_oper_num = curQst.min_oper_num; // 最小值
            option.max_oper_num = curQst.max_oper_num; // 最大值
            option.rate = 0; // 权重 - 默认0 - 非问卷解析字段
            option.text = ""; // 填空内容 - 默认空字符串 - 非问卷解析字段
            option.is_reverse = false; // 是否反向 - 默认false
            option.options = []; // 选项
            option.children = []; // 针对矩阵题or多填
            option.data_index = curQst.data_index; // 数据库索引
            option.is_repeat = false; // 是否去重 - 解析默认false
            optArr.push(option);
            return optArr;
        }
        if (undefined == maxNum || null == maxNum) {
            return optArr;
        }
        for (let i = 0; i < maxNum; i++) {//矩阵单选，矩阵量表，矩阵多选，矩阵填空
            let option = new Object();
            option.tid = curQst.tid; //题目计数序号-和题目外部一样
            option.title_id = curQst.title_id; // 题目标题id-和题目外部一样
            option.title = curQst.title + oldData.srcQstData.answers[i].display; // 父题目+本title
            option.title_type = curQst.title_type; // 和题目外部一样
            option.sys_type = curQst.sys_type; // 和题目外部一样
            option.name = oldData.srcQstData.answers[i].display; // 题目的选项名称
            option.value = (i+1).toString();
            option.real_value = oldData.srcQstData.answers[i].answerId; // 问卷提交对应的值
            option.is_jump = false; // 是否跳题
            option.jump_to = ""; // 跳到第几题
            option.req = curQst.req; // 是否必须 - 和题目外部一样
            option.is_text = curQst.is_text; // 是否需要填空 - 默认false
            option.relation = ""; // 关联 - 内部不需要这个字段
            option.min_oper_num = 0; // 最小值
            option.max_oper_num = 0; // 最大值
            option.rate = 0; // 权重 - 默认0 - 非问卷解析字段
            option.text = ""; // 填空内容 - 默认空字符串 - 非问卷解析字段
            option.is_reverse = false; // 是否反向 - 默认false
            option.options = []; // 选项
            option.children = []; // 针对矩阵题or多填
            option.data_index = curQst.data_index; // 数据库索引
            option.is_repeat = false; // 是否去重 - 解析默认false
            optArr.push(option);
        }
        return optArr;
    }

    // 获取子选项（只针对矩阵or多填）
    const getChildren = function (oldData, curQst, dataIndexDict) {
        let optionList = oldData.inner;
        let range = oldData.range;
        let childArr = new Array();

        //{"lastDataIndex" : 0, "curQstDataIndex":[]};
        let lastDataIndex = dataIndexDict["lastDataIndex"];
        let len = 0;
        if ("MATRIX" == curQst.sys_type || "MULTIPLE_MATRIX" == curQst.sys_type || "MATRIX_TEXT" == curQst.sys_type) {//矩阵单选，矩阵量表，矩阵多选，矩阵填空
            len = getJsonLength(oldData.srcQstData.choices);
            for (let i = 0; i < len; i++) {
                let curChild = new Object();
                curChild.tid = curQst.tid; //题目计数序号-和题目外部一样
                curChild.title_id = curQst.title_id; // 题目标题id-和题目外部一样
                curChild.title = curQst.title + oldData.srcQstData.choices[i].display; //  parent的title + child的name组成一个title
                curChild.title_type = curQst.title_type; // 和题目外部一样
                curChild.sys_type = curQst.sys_type; // 和题目外部一样
                curChild.name = oldData.srcQstData.choices[i].display; // 题目的选项名称
                curChild.value = (i+1).toString();
                curChild.real_value = oldData.srcQstData.choices[i].choiceId; // 问卷提交对应的值
                curChild.is_jump = false; // 是否跳题
                curChild.jump_to = ""; // 跳到第几题
                curChild.req = curQst.req; // 是否必须 - 和题目外部一样
                curChild.is_text = false; // 是否需要填空 - 默认false
                curChild.relation = ""; // 关联 - 内部不需要这个字段
                curChild.min_oper_num = 0; // 最小值
                curChild.max_oper_num = 0; // 最大值
                setMaxAndMinIfExist(curChild, range);
                curChild.rate = 0; // 权重 - 默认0 - 非问卷解析字段
                curChild.text = ""; // 填空内容 - 默认空字符串 - 非问卷解析字段
                curChild.is_reverse = false; // 是否反向 - 默认false
                curChild.data_index = lastDataIndex + i; // 数据库索引
                if("MULTIPLE_MATRIX" == curQst.sys_type || "MATRIX_TEXT" == curQst.sys_type) {//矩阵多选or矩阵填空
                    curChild.options = getChildOptionOnly4MultiMatrix(getJsonLength(oldData.srcQstData.answers), curChild, oldData, dataIndexDict); // 选项
                    curChild.data_index = dataIndexDict["lastDataIndex"]; // 数据库索引
                    dataIndexDict["curQstDataIndex"].push(dataIndexDict["lastDataIndex"]);
                    dataIndexDict["lastDataIndex"] = dataIndexDict["lastDataIndex"] + 1;
                } else {
                    curChild.data_index = dataIndexDict["lastDataIndex"] + i; // 数据库索引
                    dataIndexDict["curQstDataIndex"].push(dataIndexDict["lastDataIndex"] + i);
                    curChild.options = getChildOption(getJsonLength(oldData.srcQstData.answers), curChild, oldData); // 选项
                }
                curChild.children = []; // 针对矩阵or多填题
                curChild.is_repeat = false; // 是否去重 - 解析默认false
                childArr.push(curChild);
            }
            if("MULTIPLE_MATRIX" != curQst.sys_type) {//不是矩阵多选
                dataIndexDict["lastDataIndex"] = dataIndexDict["lastDataIndex"] + len;
            }
        } else if("MULTIPLE_TEXT" == curQst.sys_type) {//多项填空
            len = getJsonLength(oldData.srcQstData.choices);
            for (let i = 0; i < len; i++) {
                let curChild = new Object();
                curChild.tid = curQst.tid; //题目计数序号-和题目外部一样
                curChild.title_id = curQst.title_id; // 题目标题id-和题目外部一样
                curChild.title = curQst.title + oldData.srcQstData.choices[i].display; //  parent的title + child的name组成一个title
                curChild.title_type = curQst.title_type; // 和题目外部一样
                curChild.sys_type = curQst.sys_type; // 和题目外部一样
                curChild.name = oldData.srcQstData.choices[i].display; // 题目的选项名称
                curChild.value = (i+1).toString();
                curChild.real_value = oldData.srcQstData.choices[i].choiceId; // 问卷提交对应的值
                curChild.is_jump = false; // 是否跳题
                curChild.jump_to = ""; // 跳到第几题
                curChild.req = curQst.req; // 是否必须 - 和题目外部一样
                curChild.is_text = curQst.is_text; // 是否需要填空 - 默认false
                curChild.relation = ""; // 关联 - 内部不需要这个字段
                curChild.min_oper_num = 0; // 最小值
                curChild.max_oper_num = 0; // 最大值
                setMaxAndMinIfExist(curChild, range);
                curChild.rate = 0; // 权重 - 默认0 - 非问卷解析字段
                curChild.text = ""; // 填空内容 - 默认空字符串 - 非问卷解析字段
                curChild.is_reverse = false; // 是否反向 - 默认false
                curChild.data_index = lastDataIndex + i; // 数据库索引
                curChild.options = getChildOption(getJsonLength(oldData.srcQstData.answers), curChild, oldData); // 选项
                curChild.children = []; // 针对矩阵or多填题
                curChild.is_repeat = false; // 是否去重 - 解析默认false
                childArr.push(curChild);
                dataIndexDict["curQstDataIndex"].push(lastDataIndex + i);
            }
            dataIndexDict["lastDataIndex"] = lastDataIndex + len;
        } else {
            len = getJsonLength(optionList);
            for (let i = 0; i < len; i++) {
                let curChild = new Object();
                curChild.tid = curQst.tid; //题目计数序号-和题目外部一样
                curChild.title_id = curQst.title_id; // 题目标题id-和题目外部一样
                curChild.title = curQst.title + optionList[i].title == undefined? "": optionList[i].title; //  parent的title + child的name组成一个title
                curChild.title_type = curQst.title_type; // 和题目外部一样
                curChild.sys_type = curQst.sys_type; // 和题目外部一样
                curChild.name = optionList[i].title.split("_")[0]; // 题目的选项名称
                curChild.value = (i+1).toString();
                curChild.real_value = optionList[i].optionId; // 问卷提交对应的值
                curChild.is_jump = false; // 是否跳题
                curChild.jump_to = ""; // 跳到第几题
                curChild.req = curQst.req; // 是否必须 - 和题目外部一样
                curChild.is_text = curQst.is_text; // 是否需要填空 - 默认false
                curChild.relation = ""; // 关联 - 内部不需要这个字段
                curChild.min_oper_num = 0; // 最小值
                curChild.max_oper_num = 0; // 最大值
                setMaxAndMinIfExist(curChild, range);
                curChild.rate = 0; // 权重 - 默认0 - 非问卷解析字段
                curChild.text = ""; // 填空内容 - 默认空字符串 - 非问卷解析字段
                curChild.is_reverse = false; // 是否反向 - 默认false
                curChild.data_index = lastDataIndex + i; // 数据库索引
                curChild.options = getChildOption((range == undefined || range == null) ? null : range.maxvalue, curChild, oldData); // 选项
                curChild.children = []; // 针对矩阵or多填题
                curChild.is_repeat = false; // 是否去重 - 解析默认false
                childArr.push(curChild);
                dataIndexDict["curQstDataIndex"].push(lastDataIndex + i);
            }
            dataIndexDict["lastDataIndex"] = lastDataIndex + len;
        }
        return childArr;
    }

    // 获取data_index数据中的多选选项
    const getDataIdxCheckboxOption = function (curQst, dataIndexDict, idx) {
        let lastDataIndex = dataIndexDict["lastDataIndex"];
        let option = new Object();
        option.tid = curQst.tid; //题目计数序号-和题目外部一样
        option.title_id = curQst.title_id; // 题目标题id-和题目外部一样
        option.title = curQst.title; // 和题目外部一样
        option.title_type = curQst.title_type; // 和题目外部一样
        option.sys_type = curQst.sys_type; // 和题目外部一样
        option.name = curQst.name; // 题目的选项名称
        option.value = idx+1;
        option.real_value = curQst.value; // 问卷提交对应的值
        option.is_jump = false; // 是否跳题
        option.jump_to = ""; // 跳到第几题
        option.req = curQst.req; // 是否必须 - 和题目外部一样
        option.is_text = curQst.is_text; // 是否需要填空 - 默认false
        option.relation = ""; // 关联 - 内部不需要这个字段
        option.min_oper_num = curQst.min_oper_num; // 最小值
        option.max_oper_num = curQst.max_oper_num; // 最大值
        option.rate = 0; // 权重 - 默认0 - 非问卷解析字段
        option.text = ""; // 填空内容 - 默认空字符串 - 非问卷解析字段
        option.is_reverse = false; // 是否反向 - 默认false
        option.options = []; // 选项
        option.children = []; // 针对矩阵or多填
        option.data_index = lastDataIndex; // 数据库索引
        option.is_repeat = false; // 是否去重 - 解析默认false
        dataIndexDict["curQstDataIndex"].push(lastDataIndex);
        dataIndexDict["lastDataIndex"] = lastDataIndex + 1;
        return option;
    }

    // 获取data_index数据
    const getDataIndexArr = function (result) {
        let dataIndexArr = new Array(); // 数据库对应的数据

        let counter = 0;
        let dataArr = result.data; // new Array();//
        let len = getJsonLength(dataArr);
        let dataIndexDict = { "lastDataIndex": 0, "curQstDataIndex": [] };//用于记录上一个索引，和当前题目data_index集合
        for (let i = 0; i < len; i++) {
            //console.log(key);
            // if ("多选" == dataArr[i].type) {
            //     let optionList = dataArr[i].inner;
            //     let len = getJsonLength(optionList);
            //     for (let j = 0; j < len; j++) {
            //         let curData = dataArr[i];
            //         let tmp = new Object();
            //         tmp.tid = curData.id; // 题目的计数序号，唯一但不用于提交，可在relation中使用
            //         tmp.title_id = curData.qid; // 题目id_每个问卷每个题目唯一标识，提交用
            //         tmp.title = tmp.title_id + curData.title; // 题目的标题，title_id + 标题字符串
            //         tmp.title_type = curData.srcType; // 题目类型_每个平台自己的题目类型_1_23
            //         tmp.sys_type = traslateType(curData.type, curData.srcType); // 内部平台题目类型
            //         tmp.name = tmp.title; // 题目名称，同title
            //         tmp.value = ""; // 值 - 题目维度下不需要填
            //         tmp.is_jump = curData.hasJump; // 是否是跳题 "1" || True | ""
            //         tmp.jump_to = null == curData.jumpData ? "" : curData.jumpData; // 跳到哪个题目 "" / title_id
            //         tmp.req = traslateRequired(curData.isRequired); // 是否必须题 "1" / "0" || ""
            //         tmp.is_text = isText(tmp); // 是否填空题 bool
            //         tmp.relation = curData.relation;
            //         tmp.min_oper_num = 0; // 最小值
            //         tmp.max_oper_num = 0; // 最大值
            //         setMaxAndMinIfExist(tmp, curData.range);
            //         tmp.rate = 0; // 权重 - 题目维度下不需要填
            //         tmp.text = ""; // 填空内容 - 题目维度下不需要填
            //         tmp.is_reverse = false; //是否反转 - 题目维度下不需要填
            //         tmp.options = [getDataIdxCheckboxOption(tmp, dataIndexDict, j)];
            //         tmp.children = [];
            //         tmp.data_index = dataIndexDict["curQstDataIndex"]; // 数据库索引
            //         dataIndexDict["curQstDataIndex"] = [];

            //         dataIndexArr.push(tmp);
            //     }
            // } else {
            let jumpDict = {};
            let curData = dataArr[i];
            let tmp = new Object();
            tmp.tid = curData.id; // 题目的计数序号，唯一但不用于提交，可在relation中使用
            tmp.title_id = curData.qid; // 题目id_每个问卷每个题目唯一标识，提交用
            tmp.title = tmp.title_id + curData.title; // 题目的标题，title_id + 标题字符串
            tmp.title_type = curData.srcType; // 题目类型_每个平台自己的题目类型_1_23
            tmp.sys_type = traslateType(curData.type, curData.srcType); // 内部平台题目类型
            tmp.name = tmp.title; // 题目名称，同title
            tmp.value = ""; // 值 - 题目维度下不需要填
            tmp.is_jump = curData.hasJump; // 是否是跳题 "1" || True | ""
            if(curData.hasJump) {
                jumpDict = translate2JumpDict(curData.jumpData);
            }
            tmp.jump_to = "";//null == curData.jumpData ? "" : curData.jumpData; // 跳到哪个题目 "" / title_id
            tmp.req = traslateRequired(curData.isRequired); // 是否必须题 "1" / "0" || ""
            tmp.is_text = isText(tmp); // 是否填空题 bool
            tmp.relation = curData.relation;
            tmp.min_oper_num = 0; // 最小值
            tmp.max_oper_num = 0; // 最大值
            setMaxAndMinIfExist(tmp, curData.range);
            tmp.rate = 0; // 权重 - 题目维度下不需要填
            tmp.text = ""; // 填空内容 - 题目维度下不需要填
            tmp.is_reverse = false; //是否反转 - 题目维度下不需要填
            tmp.options = [];
            tmp.children = [];
            if ("MATRIX" == tmp.sys_type || "MULTIPLE_MATRIX" == tmp.sys_type || "MATRIX_TEXT" == tmp.sys_type
                || "MULTIPLE_TEXT" == tmp.sys_type || "SLIDE" == tmp.sys_type) { // 矩阵or多填题or滑动条
                tmp.children = getChildren(curData, tmp, dataIndexDict);
            } else if ("TEXT" == tmp.sys_type || "AREA" == tmp.sys_type || "DATE" == tmp.sys_type) { // 填空类题型
                tmp.options.push(buildTextOption(tmp, dataIndexDict));
            } else {
                tmp.options = tanslateOptions(curData.inner, tmp, curData.srcQstData, dataIndexDict, jumpDict); // 选项
            }
            tmp.data_index = dataIndexDict["curQstDataIndex"]; // 数据库索引
            tmp.is_repeat = false; // 是否去重 - 题目维度下不需要填 - 对于解析来说，默认false
            dataIndexDict["curQstDataIndex"] = [];

            dataIndexArr.push(tmp);
            // }
        }
        let newDataIndexArr = convertDataIndexArr(dataIndexArr); // 转换data_index数组为wjx格式
        return newDataIndexArr;//dataIndexArr;
    }
    
    // 转换data_index数组为wjx格式
    const convertDataIndexArr = function (dataIndexArr) {
        let newDataIndexArr = new Array();
        let len = getJsonLength(dataIndexArr);
        counter = 0;
        for (let i = 0; i < len; i++) {
            let curData = dataIndexArr[i];
            if ("MULTIPLE_MATRIX" == curData.sys_type ) {// 矩阵多选：拆children中的options，但option值取原来整体options
                for (let j = 0; j < curData.children.length; j++) {//遍历children
                    let child = curData.children[j];
                    let options = child.options;
                    let optStr = JSON.stringify(options);
                    for (let k = 0; k < options.length; k++) {
                        let newTmp = options[k];
                        newTmp.index = counter++;
                        newTmp.options = JSON.parse(optStr);
                        newDataIndexArr.push(newTmp);
                    }
                }
            } else if ("MATRIX_TEXT" == curData.sys_type) {// 矩阵填空：拆children中的options
                curData.children.forEach(child => {
                    child.options.forEach(option => {                        
                        let newTmp = option;
                        newTmp.index = counter++;
                        newTmp.options = [JSON.parse(JSON.stringify(option))];
                        newDataIndexArr.push(newTmp);
                    });                    
                });
            } else if ("SINGLE_SLIDE" == curData.sys_type) {// 单选滑动条：拆options，但title和name取原来整体title和name
                curData.children.forEach(child => {
                    let newTmp = child;
                    newTmp.title = curData.title;
                    newTmp.name = curData.name;
                    newTmp.index = counter++;
                    newDataIndexArr.push(newTmp);
                });
            } else if ("MATRIX" == curData.sys_type || "MULTIPLE_TEXT" == curData.sys_type || "SLIDE" == curData.sys_type ) { // 矩阵or多填题：拆children
                curData.children.forEach(child => {
                    let newTmp = child;
                    newTmp.index = counter++;
                    newDataIndexArr.push(newTmp);
                });
            } else if ("MULTIPLE" == curData.sys_type || "SORTED" == curData.sys_type || "RATE" == curData.sys_type ) { // 多选，排序和比重题：拆options
                curData.options.forEach(option => {
                    let newTmp = option;
                    newTmp.index = counter++;
                    newTmp.options = [JSON.parse(JSON.stringify(option))];
                    newDataIndexArr.push(newTmp);
                });
            } else {
                let newTmp = curData;
                newTmp.index = counter++;
                newDataIndexArr.push(newTmp);
            }
        }
        return newDataIndexArr;
    }

    // 转换为jump字典
    const translate2JumpDict = function (oldJumpData) {
        let jumpDict = {};
        let len  = getJsonLength(oldJumpData);
        for(let i=0; i<len; i++) {
            jumpDict[oldJumpData[i].optionId] = oldJumpData[i].destId;
        }
        return jumpDict;
    }

    // 将指定json数据中的real_value替换成rl_value
    const modifyRealValueToRlValue = function (jsonData) {
        let len = getJsonLength(jsonData);
        const traverse = function (obj) {
            if (typeof obj !== 'object' || obj === null) {
                return;
            }
            for (let key in obj) {
                if (obj.hasOwnProperty('real_value')) {
                    obj['rl_value'] = obj['real_value'];
                    delete obj['real_value'];
                } else {
                    traverse(obj[key]);
                }
            }
        };
        traverse(jsonData);
        return jsonData;
    }

    // 获取选项option的值列表
    const getOptionsValueList = function (options) {
        let valueList = new Array();
        for (let i = 0; i < options.length; i++) {
            valueList.push(options[i].value);
        }
        return valueList;
    }

    // 获取选项option的范围值列表
    const getOptionsRangeValueList = function (curData) {
        let valueList = new Array();
        let minVal = curData.min_oper_num;
        let maxVal = curData.max_oper_num;
        for (let i = minVal; i <= maxVal; i++) {
            valueList.push(i);
        }
        return valueList;
    }

    // 增加valid_values字段
    const addValidValues = function (dataIndexArr) {
        let len = getJsonLength(dataIndexArr);
        let sortedQstList = new Array();// 排序题列表，由于其值分散需要收集到一起
        let sortedQstValueList = [-3, -2]; // 排序题值列表
        // 根据每道题的类型添加valid_values字段
        for (let i = 0; i < len; i++) {
            let curData = dataIndexArr[i];
            if ("SINGLE" == curData.sys_type) {// 单选题
                curData.valid_values = [-3].concat(getOptionsValueList(curData.options));
            } else if ("MULTIPLE" == curData.sys_type) {// 多选题
                curData.valid_values = [-3, -2, 0, 1];
            } else if ("SINGLE_SELECT" == curData.sys_type) {// 下拉选择
                curData.valid_values = [-3, -2].concat(getOptionsValueList(curData.options));
            } else if ("SORTED" == curData.sys_type) {// 排序题
                sortedQstList.push(curData);
                sortedQstValueList = sortedQstValueList.concat(getOptionsValueList(curData.options));
            } else if ("SCALE" == curData.sys_type) {// 量表题
                curData.valid_values = [-3].concat(getOptionsValueList(curData.options));
            } else if ("MATRIX" == curData.sys_type) {// 矩阵单选
                curData.valid_values = [-3].concat(getOptionsValueList(curData.options));
            } else if ("MULTIPLE_MATRIX" == curData.sys_type) {// 矩阵多选
                curData.valid_values = [-3, -2, 0, 1];
            } else if ("SINGLE_SLIDE" == curData.sys_type) {// 单项滑动题
                curData.valid_values = getOptionsRangeValueList(curData).concat([-3]);
            } else if ("SLIDE" == curData.sys_type) {// 矩阵滑动题
                curData.valid_values = getOptionsRangeValueList(curData).concat([-3]);
            } else if ("RATE" == curData.sys_type) {// 比重题
                curData.valid_values = getOptionsRangeValueList(curData).concat([-3]);
            } else if ("DATE" == curData.sys_type) {// 日期题
                curData.valid_values = null;
            } else if ("AREA" == curData.sys_type) {// 地区题
                curData.valid_values = null;
            } else if ("TEXT" == curData.sys_type) {// 填空题
                curData.valid_values = null;
            } else if ("MULTIPLE_TEXT" == curData.sys_type) {// 多项填空
                curData.valid_values = null;
            } else if ("MATRIX_TEXT" == curData.sys_type) {// 矩阵填空
                curData.valid_values = null;
            } else {// DESCRIPTION描述类占位题
                curData.valid_values = null;
            }
        }
        // 处理排序题的valid_values字段
        for (let i = 0; i < sortedQstList.length; i++) {
            let curData = sortedQstList[i];
            curData.valid_values = sortedQstValueList;
        }
    }

    // 转换为新的结果
    const translate2newResult = function (result, resultNew) {
        let listDataArr = new Array(); // 返回的题目内容列表
        let dataArr = result.data; // new Array();//
        let len = getJsonLength(dataArr);
        let dataIndexDict = { "lastDataIndex": 0, "curQstDataIndex": [] };//用于记录上一个索引，和当前题目data_index集合
        for (let i = 0; i < len; i++) {
            let jumpDict = {};
            let curData = dataArr[i];
            let tmp = new Object();
            tmp.tid = curData.id; // 题目的计数序号，唯一但不用于提交，可在relation中使用
            tmp.title_id = curData.qid; // 题目id_每个问卷每个题目唯一标识，提交用
            tmp.title = tmp.title_id + curData.title; // 题目的标题，title_id + 标题字符串
            tmp.title_type = curData.srcType; // 题目类型_每个平台自己的题目类型_1_23
            tmp.sys_type = traslateType(curData.type, curData.srcType); // 内部平台题目类型
            tmp.name = curData.title; // 题目名称，给制单人看的
            tmp.value = ""; // 值 - 题目维度下不需要填
            tmp.is_jump = curData.hasJump; // 是否是跳题 "1" || True | ""
            if(curData.hasJump) {
                jumpDict = translate2JumpDict(curData.jumpData);
            }
            tmp.jump_to = "";//null == curData.jumpData ? "" : curData.jumpData; // 跳到哪个题目 "" / title_id
            tmp.req = traslateRequired(curData.isRequired); // 是否必须题 "1" / "0" || ""
            tmp.is_text = isText(tmp); // 是否填空题 bool
            tmp.relation = curData.relation;
            tmp.min_oper_num = 0; // 最小值
            tmp.max_oper_num = 0; // 最大值
            setMaxAndMinIfExist(tmp, curData.range);
            tmp.rate = 0; // 权重 - 题目维度下不需要填
            tmp.text = ""; // 填空内容 - 题目维度下不需要填
            tmp.is_reverse = false; //是否反转 - 题目维度下不需要填
            tmp.options = [];
            tmp.children = [];
            if ("MATRIX" == tmp.sys_type || "MULTIPLE_MATRIX" == tmp.sys_type || "MATRIX_TEXT" == tmp.sys_type
                || "MULTIPLE_TEXT" == tmp.sys_type || "SLIDE" == tmp.sys_type) { // 矩阵or多填题or滑动条
                tmp.children = getChildren(curData, tmp, dataIndexDict);
            } else if ("TEXT" == tmp.sys_type || "AREA" == tmp.sys_type || "DATE" == tmp.sys_type) { // 填空类题型
                tmp.options.push(buildTextOption(tmp, dataIndexDict));
            } else {
                tmp.options = tanslateOptions(curData.inner, tmp, curData.srcQstData, dataIndexDict, jumpDict); // 选项
            }
            if("DESCRIPTION" != tmp.sys_type) {//描述类占位题不生成dataIndexDict值
                tmp.data_index = dataIndexDict["curQstDataIndex"]; // 数据库索引
            }
            tmp.is_repeat = false; // 是否去重 - 题目维度下不需要填 - 对于解析来说，默认false
            dataIndexDict["curQstDataIndex"] = [];

            listDataArr.push(tmp);
        }
        resultNew.list = modifyRealValueToRlValue(listDataArr);//相关分析需要删除real_value才能运行成功，故此处先将real_value替换成rl_value
        let dataIndexArr = getDataIndexArr(result);
        let newDataIndexArr = modifyRealValueToRlValue(dataIndexArr); // 相关分析需要删除real_value才能运行成功，故此处先将real_value替换成rl_value
        addValidValues(newDataIndexArr); // 增加valid_values字段
        resultNew.data_index = newDataIndexArr;
        resultNew.total_data_index = dataIndexDict["lastDataIndex"];
    }

    // const srcData = window.qsSrcData;
    //加载题目主体函数定义
    const getDataArr = function () {
        let resultNew = { list: [], data_index: [], total_data_index: 0 };//list代表问卷的所有题目；data_index代表数据库对应的数据；

        var result = { title: '', error: '', data: [] };//error内容为加载失败消息：如问卷暂停、需微信登录等
        var dataArray = new Array(); // 返回的题目内容列表
        var logicDict4skip = []; //跳转逻辑映射字典{questionId:qstId}
        var logicDict4display = []; //显示逻辑映射字典{questionId:sortNo}
        var blockJumpDick = []; //跳转到下一个block的情况字典{源qid:下个block的第一题的qid}
        var blockNum = getJsonLength(srcData.blocks);
        var counter = 0;
        let sceneBlockIdArr = new Array();

        // 情景题(也叫随机题)临时处理方案：返回“情景题”暂时不做处理；
        let flList = srcData.surFlow.flowList;
        let flowLength = getJsonLength(flList);
        for (let i = 0; i < flowLength; i++) {
            if (0 == flList[i].blockId && 0 != flList[i].subSet) {
                sceneBlockIdArr.push(...getSceneBlockIdArr(flList[i].flowList));//合并数组
            }
        }

        // 流程控制暂不支持
        for (let i = 0; i < flowLength; i++) {
            if (flList[i].hasOwnProperty("branchLogicList")) {
                result.title = srcData.surveyName;
                result.error = "流程控制暂不支持";
                result.data = dataArray;
                return result;
            }
        }

        for (var k = 0; k < blockNum; k++) {
            var curBlock = srcData.blocks[k];
            // HBO块暂不支持处理
            if (5 == curBlock.type) {
                result.title = srcData.surveyName;
                result.error = "HBO块暂不支持(起始题号" + (++counter) + ")";
                result.data = dataArray;
                return result;
            }
            // CBC块暂不支持处理
            if (4 == curBlock.type) {
                result.title = srcData.surveyName;
                result.error = "CBC块暂不支持(起始题号" + (++counter) + ")";
                result.data = dataArray;
                return result;
            }
            var elements = curBlock.blockElements;
            var jsonLen = getJsonLength(elements);
            for (var i = 0; i < jsonLen; i++) {
                var tmp = new Object();
                tmp.id = ++counter; // 全局题号 ，从1开始递增。 
                tmp.qid = elements[i].qstId.toString(); // 题目id（提交使用的ID）
                tmp.type = getType(elements[i]);  // 见typeName 定义 返回字符串
                if (-1 != sceneBlockIdArr.indexOf(curBlock.blockId) || 2 == curBlock.blockOption.randomType) {//对于情景题的类型赋值
                    tmp.type = "情景题";
                }
                tmp.range = null;
                tmp.relation = '';
                tmp.jumpData = null;
                tmp.inner = getOptions(elements[i]); // 选项数据。 见选项数据定义
                // 选项的可选范围（多选、排序赋值，单选等不用管）。
                if (elements[i].hasOwnProperty("validation")) {
                    if (elements[i].validation.hasOwnProperty("min") && elements[i].validation.hasOwnProperty("max")) {
                        tmp.range = {//目前仅发现滑块题有这种范围
                            minvalue: elements[i].validation.min,
                            maxvalue: elements[i].validation.max
                        };
                    }
                }
                if (elements[i].hasOwnProperty("displayLogic")) {
                    tmp.relation = elements[i].displayLogic; //赋值关联项;见关联字符串定义
                }
                if (!elements[i].hasOwnProperty("setting")) {//存在无setting的情况
                    tmp.isRequired = false;
                } else {
                    tmp.isRequired = elements[i].setting.isForceResponse; // 是否必选。
                }

                tmp.title = elements[i].qstNo + elements[i].questionText.replace(/<p>/g, "").replace(/<\/p>/g, "").replace(/<br>/g, "").replace(/_/g, ""); // 题目标题，需要避免使用特殊字符“_”
                tmp.hasJump = elements[i].hasOwnProperty("skipLogic"); // 是否跳题。为跳题需要定义
                if (tmp.hasJump) {
                    tmp.jumpData = getJumpData(elements[i], tmp.type); // 跳题数据，hasJump为true时赋值。见跳题数据定义
                    //记录跳转到下一个block的情况
                    if (k + 1 < blockNum) {
                        let tmpElemArr = srcData.blocks[k + 1].blockElements;
                        if (0 == tmpElemArr.length) {
                            result.title = srcData.surveyName;
                            result.error = "问卷包含空的板块(block:" + srcData.blocks[k + 1].blockId + "," + srcData.blocks[k + 1].description + ")，请联系问卷制作人删除该块！";
                            result.data = dataArray;
                            return result;
                        }
                        let tmpQstId = srcData.blocks[k + 1].blockElements[0].qstId;
                        if (undefined == tmpQstId) {
                            blockJumpDick[elements[i].qstId] = "无qstId";
                        } else {
                            blockJumpDick[elements[i].qstId] = tmpQstId.toString();
                        }
                    }
                }

                if (0 == tmp.inner.length && ('单选' == tmp.type || '多选' == tmp.type || '排序选择' == tmp.type || '下拉选项' == tmp.type)) {
                    tmp.type = '占位题';
                }
                tmp.srcType = elements[i].type + "_" + elements[i].questionType + "_" + elements[i].selector + "_" + elements[i].subSelector;
                tmp.srcQstData = elements[i];
                dataArray.push(tmp);

                logicDict4skip[elements[i].questionId] = elements[i].qstId;
                logicDict4display[elements[i].questionId] = counter; //elements[i].sortNo; // 
            }
        }

        //更新跳转逻辑题号
        updateSkipLogic(logicDict4skip, dataArray, blockJumpDick);
        //更新显示逻辑题号
        updateDisplayLogic(logicDict4display, dataArray);

        result.title = srcData.surveyName;
        result.data = dataArray;

        translate2newResult(result, resultNew);
        return resultNew; // return result; // 
    };

    console.log(JSON.stringify(getDataArr()));//测试输出结果

    return getDataArr();
})();